<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://paycn.com.cn/pos" prefix="p"%>

<div class="container-fluid" >
	<div class="row-fluid">
		<div class="span12">
			<h3 class="page-title">登陆统计</h3>
			<ul class="breadcrumb">
				<li>
					<i class="icon-home"></i>
					<a href="<c:url value="/home.html"/>">首页</a>
					<i class="icon-angle-right"></i>
				</li>
				<li>
					<a href="<c:url value='/loginLog/count.html'/>" >登陆统计</a>
				</li>
			</ul>
		</div>
	</div>
	<div class="row-fluid">
		<div class="span12">
			<div class="portlet box grey">
				<div class="portlet-title">
					<div class="caption"><i class="icon-bookmark"></i> 登陆统计</div>
				</div>
				<div class="portlet-body no-more-tables">
					<table class="table  table-bordered table-striped table-hover">
						<thead>
							<tr>
								<th>用户名</th>
								<th>状态</th>
								<th>登陆次数</th>
								<th>最后登录日期</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach var="log" items="${datagrid.rows}">
								<tr>
									<td data-title="用户名">${log.username}</td>
									<td data-title="状态">
										<c:choose>
											<c:when test="${log.status eq \"success\"}"><span class='label label-info'>登录成功</span></c:when>
											<c:when test="${log.status eq \"fail\"}"><span class='label label-important'>登录失败</span></c:when>
										</c:choose>
									</td>
									<td data-title="登陆次数">${log.count}</td>
									<td data-title="最后登录日期"><fmt:formatDate value="${log.lastDate}" pattern="yyyy:MM:dd HH:mm:ss"/></td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
					<p:pagination url="/loginLog/count.html" total="${datagrid.total }"/>
				</div>
			</div>
		</div>
	</div>
</div>
